<html>
<head><meta charset="utf-8"><title>-Z unpretty name · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html">-Z unpretty name</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228101225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228101225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228101225">(Feb 28 2021 at 03:23)</a>:</h4>
<p>Why is <code>-Z unpretty</code> called <strong>un</strong>pretty as opposed to pretty?</p>



<a name="228104397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228104397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228104397">(Feb 28 2021 at 04:31)</a>:</h4>
<p>My guess is that it means "<strong>un</strong>stable <strong>pretty</strong> printer", to contrast with the <code>--pretty</code> flag which I guess was meant to be for stable formats.  <a href="https://github.com/rust-lang/rust/pull/27392">The PR</a> that introduced it didn't really elaborate, though.</p>
<p>It does seem a bit confusing since both options are unstable, but maybe the intent is that <code>unpretty</code> will be unstable forever whereas <code>--pretty</code> in theory could be stabilized?</p>



<a name="228145576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228145576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228145576">(Feb 28 2021 at 17:53)</a>:</h4>
<p>Yeah, that explanation makes sense. I do wonder why there are two separate flags though—maybe <code>--unpretty</code> (née <code>--xpretty</code>) was added when <code>--pretty</code> was stable?</p>



<a name="228146737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228146737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228146737">(Feb 28 2021 at 18:13)</a>:</h4>
<p>(FWIW <code>--pretty</code> is <em>not</em> stable, it requires <code>-Zunstable-options</code>)</p>



<a name="228147344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228147344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228147344">(Feb 28 2021 at 18:24)</a>:</h4>
<p>Yes, I meant that it might have been 'stable' in the pre-1.0 days.</p>



<a name="228246773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228246773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228246773">(Mar 01 2021 at 15:12)</a>:</h4>
<p>(I actually named it "unpretty" because i considered the output to be usually anything but pretty. It often provides internal information that is useful for a compiler developer, but rarely is it useful to an end user who is just programming in Rust.)</p>



<a name="228246841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228246841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228246841">(Mar 01 2021 at 15:12)</a>:</h4>
<p>I suppose the "unpretty=expanded" could be an exception to that claim.</p>



<a name="228247050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228247050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228247050">(Mar 01 2021 at 15:13)</a>:</h4>
<p>see also <a href="https://github.com/rust-lang/rust/issues/27392">#27392</a></p>



<a name="228247672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228247672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228247672">(Mar 01 2021 at 15:17)</a>:</h4>
<p>which indicates that originally it was <code>--xpretty</code> (as in "extended pretty"). And also, at the time when it was introduced, "pretty" <em>was</em> used for expanded, typed, etc. The only thing "unpretty" was for was "everybody_loops" and flowgraph-printing.</p>



<a name="228247731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228247731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228247731">(Mar 01 2021 at 15:18)</a>:</h4>
<p>(which reinforces my original point that the output was likely to only be useful to a rustc developer.)</p>



<a name="228334694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228334694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228334694">(Mar 02 2021 at 00:49)</a>:</h4>
<p>I appreciate how in <a href="https://github.com/rust-lang/rust/issues/27392">#27392</a> you said</p>
<blockquote>
<p>Make sure this gets a low priority if it gets r-plussed!</p>
</blockquote>
<p>and the reviewer posted</p>
<blockquote>
<p>looks good to me @bors r+ p=100000000</p>
</blockquote>
<p><span aria-label="rofl" class="emoji emoji-1f923" role="img" title="rofl">:rofl:</span></p>



<a name="228336543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/-Z%20unpretty%20name/near/228336543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/-Z.20unpretty.20name.html#228336543">(Mar 02 2021 at 01:07)</a>:</h4>
<p>Well, if you treat <code>p=</code> like <code>nice</code>...</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>